/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lambkit.module.upms.sql;

import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.column.Column;
import com.lambkit.db.sql.column.Columns;
import com.lambkit.db.sql.column.Example;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date 2022-09-23
 * @version 1.0
 * @since 1.0
 */
public class UpmsUserAccountRoleSqlBuilder extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static UpmsUserAccountRoleSqlBuilder create() {
		return new UpmsUserAccountRoleSqlBuilder();
	}
	
	public static UpmsUserAccountRoleSqlBuilder create(Column column) {
		UpmsUserAccountRoleSqlBuilder that = new UpmsUserAccountRoleSqlBuilder();
		that.add(column);
        return that;
    }

    public static UpmsUserAccountRoleSqlBuilder create(String name, Object value) {
        return (UpmsUserAccountRoleSqlBuilder) create().eq(name, value);
    }
    
    public Example example() {
    	return Example.create("upms_user_account_role", this);
    }
    
    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public UpmsUserAccountRoleSqlBuilder like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public UpmsUserAccountRoleSqlBuilder notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public UpmsUserAccountRoleSqlBuilder le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public UpmsUserAccountRoleSqlBuilder isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public UpmsUserAccountRoleSqlBuilder notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public UpmsUserAccountRoleSqlBuilder empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public UpmsUserAccountRoleSqlBuilder notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public UpmsUserAccountRoleSqlBuilder add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public UpmsUserAccountRoleSqlBuilder andIdIsNull() {
		isnull("id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andIdIsNotNull() {
		notNull("id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andIdIsEmpty() {
		empty("id");
		return this;
	}

	public UpmsUserAccountRoleSqlBuilder andIdIsNotEmpty() {
		notEmpty("id");
		return this;
	}
       public UpmsUserAccountRoleSqlBuilder andIdEqualTo(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.EQUAL, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdNotEqualTo(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.NOT_EQUAL, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdGreaterThan(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.GREATER_THEN, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.GREATER_EQUAL, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdLessThan(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.LESS_THEN, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("id", value, ConditionMode.LESS_EQUAL, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("id", value1, value2, ConditionMode.BETWEEN, "id", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("id", value1, value2, ConditionMode.NOT_BETWEEN, "id", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsUserAccountRoleSqlBuilder andIdIn(List<java.lang.Long> values) {
          addCriterion("id", values, ConditionMode.IN, "id", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andIdNotIn(List<java.lang.Long> values) {
          addCriterion("id", values, ConditionMode.NOT_IN, "id", "java.lang.Long", "Float");
          return this;
      }
	public UpmsUserAccountRoleSqlBuilder andUserAccountIdIsNull() {
		isnull("user_account_id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andUserAccountIdIsNotNull() {
		notNull("user_account_id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andUserAccountIdIsEmpty() {
		empty("user_account_id");
		return this;
	}

	public UpmsUserAccountRoleSqlBuilder andUserAccountIdIsNotEmpty() {
		notEmpty("user_account_id");
		return this;
	}
       public UpmsUserAccountRoleSqlBuilder andUserAccountIdEqualTo(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.EQUAL, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdNotEqualTo(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.NOT_EQUAL, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdGreaterThan(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.GREATER_THEN, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.GREATER_EQUAL, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdLessThan(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.LESS_THEN, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("user_account_id", value, ConditionMode.LESS_EQUAL, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("user_account_id", value1, value2, ConditionMode.BETWEEN, "userAccountId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("user_account_id", value1, value2, ConditionMode.NOT_BETWEEN, "userAccountId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsUserAccountRoleSqlBuilder andUserAccountIdIn(List<java.lang.Long> values) {
          addCriterion("user_account_id", values, ConditionMode.IN, "userAccountId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andUserAccountIdNotIn(List<java.lang.Long> values) {
          addCriterion("user_account_id", values, ConditionMode.NOT_IN, "userAccountId", "java.lang.Long", "Float");
          return this;
      }
	public UpmsUserAccountRoleSqlBuilder andRoleIdIsNull() {
		isnull("role_id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andRoleIdIsNotNull() {
		notNull("role_id");
		return this;
	}
	
	public UpmsUserAccountRoleSqlBuilder andRoleIdIsEmpty() {
		empty("role_id");
		return this;
	}

	public UpmsUserAccountRoleSqlBuilder andRoleIdIsNotEmpty() {
		notEmpty("role_id");
		return this;
	}
       public UpmsUserAccountRoleSqlBuilder andRoleIdEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdNotEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.NOT_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdGreaterThan(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.GREATER_THEN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.GREATER_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdLessThan(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.LESS_THEN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("role_id", value, ConditionMode.LESS_EQUAL, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("role_id", value1, value2, ConditionMode.BETWEEN, "roleId", "java.lang.Long", "Float");
    	  return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("role_id", value1, value2, ConditionMode.NOT_BETWEEN, "roleId", "java.lang.Long", "Float");
          return this;
      }
        
      public UpmsUserAccountRoleSqlBuilder andRoleIdIn(List<java.lang.Long> values) {
          addCriterion("role_id", values, ConditionMode.IN, "roleId", "java.lang.Long", "Float");
          return this;
      }

      public UpmsUserAccountRoleSqlBuilder andRoleIdNotIn(List<java.lang.Long> values) {
          addCriterion("role_id", values, ConditionMode.NOT_IN, "roleId", "java.lang.Long", "Float");
          return this;
      }
}